<html>
<head><meta charset="utf-8"><title>rust-analyzer#734 test_vfs_works on OS X · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html">rust-analyzer#734 test_vfs_works on OS X</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="158110116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110116">(Feb 12 2019 at 11:25)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="133169">@matklad</span> , do you know offhand if rust-analyzer has known issues on OS X?</p>



<a name="158110168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110168">(Feb 12 2019 at 11:26)</a>:</h4>
<p>I'm doing <code>cargo test</code> and am hitting Timeout errors during <code>test_vfs_works</code>, which may or may not be related to <a href="https://github.com/rust-analyzer/rust-analyzer/issues/734" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/734">rust-analyzer#734</a></p>



<a name="158110169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110169">(Feb 12 2019 at 11:26)</a>:</h4>
<p>I don't know, but this seems unlikely. That is, I'd say its "90% works out of the box", but some weired shenanigans are not excluded.</p>



<a name="158110171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110171">(Feb 12 2019 at 11:26)</a>:</h4>
<p>aaaa</p>



<a name="158110173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110173">(Feb 12 2019 at 11:26)</a>:</h4>
<p>that is a known issue</p>



<a name="158110188"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110188" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110188">(Feb 12 2019 at 11:27)</a>:</h4>
<p>So I shouldn't bother with <code>cargo test</code> for now?</p>



<a name="158110190"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110190" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110190">(Feb 12 2019 at 11:27)</a>:</h4>
<p><a href="https://github.com/rust-analyzer/rust-analyzer/issues/734" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/734">https://github.com/rust-analyzer/rust-analyzer/issues/734</a></p>



<a name="158110203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110203">(Feb 12 2019 at 11:27)</a>:</h4>
<p>Well, it's best to fix the issue, or to disable these tests on macos</p>



<a name="158110204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110204">(Feb 12 2019 at 11:27)</a>:</h4>
<p>I will note that my stack trace points to a  different line number, I think...</p>



<a name="158110208"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110208" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110208">(Feb 12 2019 at 11:27)</a>:</h4>
<p>Yeah but I'm not even 100% sure what the issue is right now</p>



<a name="158110252"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110252" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110252">(Feb 12 2019 at 11:28)</a>:</h4>
<p>they say that they are getting to vfs.rs:82</p>



<a name="158110262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110262">(Feb 12 2019 at 11:28)</a>:</h4>
<p>I'm getting it on vfs.rs:71</p>



<a name="158110268"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110268" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110268">(Feb 12 2019 at 11:28)</a>:</h4>
<p>(but maybe that is an artifact of changes to the code since that bug was filed.)</p>



<a name="158110276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110276">(Feb 12 2019 at 11:29)</a>:</h4>
<p>this test is about watching file system for changes. We hit many curious issues in this subsystem and upstreamed a couple of fixed to the notify library we use</p>



<a name="158110301"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110301" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110301">(Feb 12 2019 at 11:29)</a>:</h4>
<p>in particular I am hitting it on <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/tests/vfs.rs#L71" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/tests/vfs.rs#L71">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/tests/vfs.rs#L71</a></p>



<a name="158110381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110381">(Feb 12 2019 at 11:30)</a>:</h4>
<p>Reported line in repo at time of issue filing: <a href="https://github.com/rust-analyzer/rust-analyzer/blob/55408081b05f79947f7ce4692b31be584aef4657/crates/ra_vfs/tests/vfs.rs#L82" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/55408081b05f79947f7ce4692b31be584aef4657/crates/ra_vfs/tests/vfs.rs#L82">https://github.com/rust-analyzer/rust-analyzer/blob/55408081b05f79947f7ce4692b31be584aef4657/crates/ra_vfs/tests/vfs.rs#L82</a></p>



<a name="158110388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110388">(Feb 12 2019 at 11:31)</a>:</h4>
<p>ah okay so it is the same line then</p>



<a name="158110407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110407">(Feb 12 2019 at 11:31)</a>:</h4>
<p>Two thoughs:</p>
<ul>
<li>try increasing timeout in the 10th line</li>
<li>try to add std::thread::sleep_ms(2000) on line 69 (<em>before</em> fs::write call)</li>
</ul>



<a name="158110431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110431">(Feb 12 2019 at 11:32)</a>:</h4>
<p>I increased timeout to 10 seconds earlier. Didn't seem to help, so I didn't try larger values. But I can give it a shot</p>



<a name="158110461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110461">(Feb 12 2019 at 11:32)</a>:</h4>
<p>My hypothesis is (from a similar bug in Cargo) that MacOS misses modifications to a file if they withing the same seconds</p>



<a name="158110464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110464">(Feb 12 2019 at 11:32)</a>:</h4>
<p>though maybe I'll try adding the sleep call first</p>



<a name="158110472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110472">(Feb 12 2019 at 11:32)</a>:</h4>
<p>the sleep call before write could help with that I think</p>



<a name="158110487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110487">(Feb 12 2019 at 11:33)</a>:</h4>
<blockquote>
<p>My hypothesis is (from a similar bug in Cargo) that MacOS misses modifications to a file if they withing the same seconds</p>
</blockquote>
<p>Hmm interesting. I recall various timestamp issues when I worked on tango; I guess I had hoped that a notification system wouldn't fall victim to similar issues...</p>



<a name="158110599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110599">(Feb 12 2019 at 11:35)</a>:</h4>
<p>grr sleep did not fix things either. Hmm.</p>



<a name="158110608"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110608" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110608">(Feb 12 2019 at 11:35)</a>:</h4>
<p>yeah, I wouldn't call our file watching service reliable, it has issues.... Though luckily its not <em>that</em> important: most change notifications go via LSP, which works great. VFS watching is for cases like <code>git checkokut other-branch</code>.</p>



<a name="158110672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110672">(Feb 12 2019 at 11:36)</a>:</h4>
<p>Given ^, I am fine with <code>#[cfg_attr(macos, ignore)] // #734</code></p>



<a name="158110696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110696">(Feb 12 2019 at 11:37)</a>:</h4>
<p>(This is of course a schrodinger's-cat style bug where if I add instrumentation to try to learn more about the actual timestamps I might disrupt the replication of the bug itself...)</p>



<a name="158110714"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110714" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110714">(Feb 12 2019 at 11:37)</a>:</h4>
<p>well, if adding timestamps fixes the test....</p>



<a name="158110754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110754">(Feb 12 2019 at 11:38)</a>:</h4>
<p>I'll poke at this a tiny bit more before resorting to cfg-ignoring it</p>



<a name="158110785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110785">(Feb 12 2019 at 11:39)</a>:</h4>
<p>It might be useful to stick <code>dbg!(event)</code> here: <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/src/io.rs#L151" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/src/io.rs#L151">https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/src/io.rs#L151</a></p>



<a name="158110795"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110795" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110795">(Feb 12 2019 at 11:39)</a>:</h4>
<p>that would be even we get from the library.</p>



<a name="158110803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110803">(Feb 12 2019 at 11:39)</a>:</h4>
<p>Isn't that going to emit output to stdout/stderr? That's the sort of thing I was assuming would disrupt the bug</p>



<a name="158110856"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110856" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110856">(Feb 12 2019 at 11:40)</a>:</h4>
<p>I was thinking i might emit data to a separate (in-memory) log that could be printed after the bug was observed</p>



<a name="158110863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110863">(Feb 12 2019 at 11:40)</a>:</h4>
<p>but I guess it doesn't hurt to try adding the <code>dbg!</code> call and see what happens, if the bug continues to reproduce then no harm done</p>



<a name="158110898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110898">(Feb 12 2019 at 11:41)</a>:</h4>
<p>If sleeps don't disrupt the bug, there's a change that dbg won't as well, yeah</p>



<a name="158110900"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110900" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110900">(Feb 12 2019 at 11:42)</a>:</h4>
<p>(look at that, it does indeed continue to reproduce. great!)</p>



<a name="158110951"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158110951" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158110951">(Feb 12 2019 at 11:42)</a>:</h4>
<p>/me is going to run and get lunch before its all gone. I'll be back in a 10 or 15 minuts</p>



<a name="158111120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158111120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158111120">(Feb 12 2019 at 11:46)</a>:</h4>
<p><a href="https://github.com/passcod/notify/issues/150" target="_blank" title="https://github.com/passcod/notify/issues/150">https://github.com/passcod/notify/issues/150</a> seems vaguely related</p>



<a name="158111654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158111654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158111654">(Feb 12 2019 at 11:57)</a>:</h4>
<blockquote>
<p>This means that if you open a file, write to it, close the file, and repeat, you will receive a single event _unless_ there is some delay between the two opens; in very simple testing this delay seems to be about 500ms.</p>
</blockquote>
<p>From <a href="https://github.com/passcod/notify/issues/147" target="_blank" title="https://github.com/passcod/notify/issues/147">https://github.com/passcod/notify/issues/147</a></p>



<a name="158112724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158112724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158112724">(Feb 12 2019 at 12:18)</a>:</h4>
<p>From that same issue:</p>
<blockquote>
<blockquote>
<p>"What's your high-level goal here?  If you're just interested in a single file, James's suggestion would work.  If you're trying to monitor an entire hierarchy of files, you're going to have to rethink you're assumptions.  FSEvents is designed to notify you about events in the file system so that you can then go look in the file system to find the current state of things and sync based on that.  It's not designed to feed you a stream of events with sufficient fidelity to reconstruct how the file system go into its current state."</p>
</blockquote>
<p>– <a href="https://lists.apple.com/archives/filesystem-dev/2016/Mar/msg00004.html" target="_blank" title="https://lists.apple.com/archives/filesystem-dev/2016/Mar/msg00004.html">https://lists.apple.com/archives/filesystem-dev/2016/Mar/msg00004.html</a></p>
</blockquote>



<a name="158112841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158112841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158112841">(Feb 12 2019 at 12:21)</a>:</h4>
<p>yeah, that's roughly what we are doing: if we receive notification, a separate thread goes and reads the file from disk</p>



<a name="158112843"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158112843" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158112843">(Feb 12 2019 at 12:21)</a>:</h4>
<p>Hmm, interesting: Adding the sleep_ms call does seem to cause two events to be observed, rather than just one (for the <code>Create(.../a/b/baz.rs)</code>, that is). <strong>But</strong> regardless of whether the two events have been folded into one or not, I still get the timeout.</p>



<a name="158112899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158112899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158112899">(Feb 12 2019 at 12:22)</a>:</h4>
<p>Oh wait, I should be seeing the <code>Write</code> event, and I'm not. (or let me double-check that)</p>



<a name="158112954"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158112954" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158112954">(Feb 12 2019 at 12:23)</a>:</h4>
<p>hmm. Is the <code>fs::write</code> call going to cause a <code>Create</code> event to be emitted here?</p>



<a name="158113025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113025">(Feb 12 2019 at 12:24)</a>:</h4>
<p>it shouldn't cause a create</p>



<a name="158113032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113032">(Feb 12 2019 at 12:24)</a>:</h4>
<p>file already exists</p>



<a name="158113063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113063">(Feb 12 2019 at 12:25)</a>:</h4>
<p>Yeah that's what I thought too, but I'm definitely seeing a <code>Create</code> (and only a <code>Create</code>) after the long pause injected by the <code>sleep_ms</code></p>



<a name="158113069"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113069" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113069">(Feb 12 2019 at 12:25)</a>:</h4>
<p>and this is a <code>write(2)</code>, not an atomic editors create temp file &amp; rename</p>



<a name="158113153"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113153" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113153">(Feb 12 2019 at 12:26)</a>:</h4>
<p>aha! That explains the bug</p>



<a name="158113160"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113160" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113160">(Feb 12 2019 at 12:26)</a>:</h4>
<p>what? Is the file being auto-deleted or something in the interim?</p>



<a name="158113167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113167">(Feb 12 2019 at 12:27)</a>:</h4>
<p>if we get Create instead of Change, we don't emit a change because file already exists in the vfs</p>



<a name="158113187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113187">(Feb 12 2019 at 12:27)</a>:</h4>
<p>ah. and so we don't see any <code>VfsChange</code> and so the task times out</p>



<a name="158113202"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113202" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113202">(Feb 12 2019 at 12:27)</a>:</h4>
<p>So the next Q might be: WHy are we seeing a <code>Change</code> here</p>



<a name="158113210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113210">(Feb 12 2019 at 12:28)</a>:</h4>
<p>I'm going to rename this topic</p>



<a name="158113234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113234">(Feb 12 2019 at 12:28)</a>:</h4>
<p>why  we get Create in the first place is beyond me, but I guess that is just "operating systems are diffrent"</p>



<a name="158113273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113273">(Feb 12 2019 at 12:28)</a>:</h4>
<p>I think "why" should not matter: I think the high-level bug is that we differentiate between Crate/Change at all</p>



<a name="158113330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113330">(Feb 12 2019 at 12:29)</a>:</h4>
<p>Given that this all vfs thing is supposed to be eventually (or quiescently) consistent, we should rely on telling if the file is created or changed.</p>



<a name="158113352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113352">(Feb 12 2019 at 12:29)</a>:</h4>
<p>s/rely/not rely/</p>



<a name="158113404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113404">(Feb 12 2019 at 12:30)</a>:</h4>
<p>(I'm going to see if I can adjust Zulip's hyperlinking for our stream.)</p>



<a name="158113421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113421">(Feb 12 2019 at 12:30)</a>:</h4>
<p>will try to  write a fix shortly!</p>



<a name="158113533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113533">(Feb 12 2019 at 12:32)</a>:</h4>
<blockquote>
<p>(I'm going to see if I can adjust Zulip's hyperlinking for our stream.)</p>
</blockquote>
<p>((did someone fix it in parallel with me, or did I just not notice two hyperlinks before...?))</p>



<a name="158113545"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113545" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113545">(Feb 12 2019 at 12:32)</a>:</h4>
<p>/me touched nothing</p>



<a name="158113559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113559">(Feb 12 2019 at 12:33)</a>:</h4>
<p>Ah okay I think <span class="user-mention" data-user-id="116107">@davidtwco</span> assisted</p>



<a name="158113582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113582">(Feb 12 2019 at 12:33)</a>:</h4>
<p>You'll see now that if you write <code>rust-analyzer#&lt;number&gt;</code> in a topic or in a chat message, the linkifer will operate on it.</p>



<a name="158113584"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113584" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113584">(Feb 12 2019 at 12:33)</a>:</h4>
<p>e.g. <a href="https://github.com/rust-analyzer/rust-analyzer/issues/734" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/734">rust-analyzer#734</a></p>



<a name="158113639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113639">(Feb 12 2019 at 12:34)</a>:</h4>
<p>we have found this to be pretty useful way to structure topics</p>



<a name="158113667"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158113667" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158113667">(Feb 12 2019 at 12:35)</a>:</h4>
<p>though it is a bit funny that there are now two arrows (one pointing to rust-analyzer/rust-analyzer#734 and another to rust-lang/rust#734); unfortunately the Zulip's OS X app API does not give any tooltip or other preview of which arrow is which...</p>



<a name="158115429"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115429" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115429">(Feb 12 2019 at 13:02)</a>:</h4>
<p>filed <a href="https://github.com/rust-analyzer/rust-analyzer/pull/805" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/pull/805">https://github.com/rust-analyzer/rust-analyzer/pull/805</a> We might need the delay  as well though</p>



<a name="158115441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115441">(Feb 12 2019 at 13:02)</a>:</h4>
<p>(linkifier will work for PRs too: <a href="https://github.com/rust-analyzer/rust-analyzer/issues/805" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/805">rust-analyzer#805</a>)</p>



<a name="158115496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115496">(Feb 12 2019 at 13:03)</a>:</h4>
<p>Can it work in the reverse direction? It's easier to copy URL from the address bar than to type in the pr number :)</p>



<a name="158115603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115603">(Feb 12 2019 at 13:05)</a>:</h4>
<p>Not that I'm aware of.</p>



<a name="158115700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115700">(Feb 12 2019 at 13:07)</a>:</h4>
<p>I don't think its a breach of ettiquette to post urls if that better fits your workflow. (Well, of course its nicer for the topic for it to use the shorter linkified version)</p>



<a name="158115708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115708">(Feb 12 2019 at 13:07)</a>:</h4>
<p>The main benefit of linkification is when one is typing on the fly, IMO.</p>



<a name="158115718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115718">(Feb 12 2019 at 13:07)</a>:</h4>
<p>You can use standard Markdown linking syntax, so <a href="https://github.com/rust-analyzer/rust-analyzer/pull/805" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/pull/805">#805</a>.</p>



<a name="158115767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115767">(Feb 12 2019 at 13:08)</a>:</h4>
<p><code>You can use standard Markdown linking syntax, so [#805](https://github.com/rust-analyzer/rust-analyzer/pull/805).</code></p>



<a name="158115778"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115778" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115778">(Feb 12 2019 at 13:08)</a>:</h4>
<p>Oh yeah, that might be the easiest way, when writing comments in the channel. But does that syntax work in topics?</p>



<a name="158115782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115782">(Feb 12 2019 at 13:08)</a>:</h4>
<p>(for some reason I thought it didn't)</p>



<a name="158115785"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115785" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> davidtwco <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115785">(Feb 12 2019 at 13:08)</a>:</h4>
<p>Not sure. I'd just use a linkifier in topics.</p>



<a name="158115811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158115811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158115811">(Feb 12 2019 at 13:09)</a>:</h4>
<p>yeah it doesn't work (I just tested; it renders as the raw markdown)</p>



<a name="158116740"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158116740" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158116740">(Feb 12 2019 at 13:24)</a>:</h4>
<p>circling back to the original topic, looks like <a href="https://github.com/rust-analyzer/rust-analyzer/issues/805" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/805">rust-analyzer#805</a> didn't actually fix the issue, even with added timeouts  (the ad-hoc mac build in <a href="https://github.com/rust-analyzer/rust-analyzer/issues/803" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/issues/803">rust-analyzer#803</a> fails) :(</p>



<a name="158116760"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158116760" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158116760">(Feb 12 2019 at 13:25)</a>:</h4>
<p>yeah I'm looking into it</p>



<a name="158127420"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127420" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127420">(Feb 12 2019 at 15:50)</a>:</h4>
<p>okay it looks to me like <code>io::handle_change</code> is falling into the <code>None</code> branch <a href="https://github.com/rust-analyzer/rust-analyzer/blob/abc5d377e2957af962c33d565fd550eb504dbbee/crates/ra_vfs/src/io.rs#L202" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/abc5d377e2957af962c33d565fd550eb504dbbee/crates/ra_vfs/src/io.rs#L202">here</a> a lot.</p>



<a name="158127439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127439">(Feb 12 2019 at 15:50)</a>:</h4>
<p>ir</p>



<a name="158127478"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127478" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127478">(Feb 12 2019 at 15:51)</a>:</h4>
<p>or rather, its falling into that branch during the lookup of <code>.../a/b/baz.rs</code> (where <code>...</code> is the tempdir)</p>



<a name="158127518"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127518" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127518">(Feb 12 2019 at 15:51)</a>:</h4>
<p>oh, that makes sense for a <code>Create</code> call.</p>



<a name="158127574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127574">(Feb 12 2019 at 15:52)</a>:</h4>
<p>(or maybe it doesn't)</p>



<a name="158127605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127605">(Feb 12 2019 at 15:52)</a>:</h4>
<p>find should return <code>Some</code> even if file does not exist</p>



<a name="158127622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127622">(Feb 12 2019 at 15:53)</a>:</h4>
<p>yeah it seems like the code there is assuming that <code>find</code> will give you the root even if the file itself hasn't been created</p>



<a name="158127633"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127633" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127633">(Feb 12 2019 at 15:53)</a>:</h4>
<p>It doesn't do syscalls and works just on path strings</p>



<a name="158127647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127647">(Feb 12 2019 at 15:53)</a>:</h4>
<p>but does that match the implementation of <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/src/lib.rs#L114" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/src/lib.rs#L114">find</a> ?</p>



<a name="158127651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127651">(Feb 12 2019 at 15:53)</a>:</h4>
<p>Could this be someting about case-insensitive file system?</p>



<a name="158127722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127722">(Feb 12 2019 at 15:54)</a>:</h4>
<p>contains is <a href="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/src/lib.rs#L71-L72" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/master/crates/ra_vfs/src/lib.rs#L71-L72">this</a></p>



<a name="158127727"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127727" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127727">(Feb 12 2019 at 15:54)</a>:</h4>
<p>it checks for prefix</p>



<a name="158127747"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127747" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127747">(Feb 12 2019 at 15:54)</a>:</h4>
<p>hmm okay I'll look deeper</p>



<a name="158127841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127841">(Feb 12 2019 at 15:55)</a>:</h4>
<p>There's a single place in the test where we expect None:</p>
<div class="codehilite"><pre><span></span>    // should be ignored
    fs::create_dir_all(dir.path().join(&quot;a/target&quot;)).unwrap();
    fs::write(&amp;dir.path().join(&quot;a/target/new.rs&quot;), &quot;ignore me&quot;).unwrap();
</pre></div>



<a name="158127899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158127899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158127899">(Feb 12 2019 at 15:56)</a>:</h4>
<p>everything else should return Some</p>



<a name="158128407"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158128407" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158128407">(Feb 12 2019 at 16:01)</a>:</h4>
<p>This <a href="https://github.com/rust-analyzer/rust-analyzer/blob/abc5d377e2957af962c33d565fd550eb504dbbee/crates/ra_vfs/src/lib.rs#L71" target="_blank" title="https://github.com/rust-analyzer/rust-analyzer/blob/abc5d377e2957af962c33d565fd550eb504dbbee/crates/ra_vfs/src/lib.rs#L71">strip_prefix call</a> is returning <code>Err(StripPrefixError)</code> for <code> "/private/var/folders/68/bxt927zn2tnbpj7qf4_4vpk80000gn/T/.tmphSepLW/a/b/baz.rs"</code></p>



<a name="158128540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158128540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158128540">(Feb 12 2019 at 16:03)</a>:</h4>
<p><code>SepLW</code> &lt;- I bet that's case sensitivity</p>



<a name="158128631"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158128631" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158128631">(Feb 12 2019 at 16:04)</a>:</h4>
<p>more detail:<br>
<code>path.strip_prefix(&amp;self.root)</code> is returning that error for </p>
<div class="codehilite"><pre><span></span>path:  &quot;/private/var/folders/68/bxt927zn2tnbpj7qf4_4vpk80000gn/T/.tmpWuoGmP/a/b/baz.rs&quot;,
self.root:  &quot;/var/folders/68/bxt927zn2tnbpj7qf4_4vpk80000gn/T/.tmpWuoGmP/a&quot;
</pre></div>



<a name="158128675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158128675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158128675">(Feb 12 2019 at 16:04)</a>:</h4>
<p>so, the first component is different...</p>



<a name="158128686"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158128686" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158128686">(Feb 12 2019 at 16:04)</a>:</h4>
<p>I think its the <code>/private</code> there, yeah</p>



<a name="158128898"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158128898" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158128898">(Feb 12 2019 at 16:07)</a>:</h4>
<p>On "OS X", <code>/var</code> is symlink to <code>/private/var</code></p>



<a name="158128984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158128984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158128984">(Feb 12 2019 at 16:08)</a>:</h4>
<p>Does VFS attempt to normalize symbolic links in its internal paths? If not, should it?</p>



<a name="158128993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158128993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158128993">(Feb 12 2019 at 16:08)</a>:</h4>
<p>No, it doesn't</p>



<a name="158129033"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158129033" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158129033">(Feb 12 2019 at 16:08)</a>:</h4>
<p>I think it <em>should</em>, though I am not 100% sure</p>



<a name="158129061"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158129061" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158129061">(Feb 12 2019 at 16:09)</a>:</h4>
<p>because under the assumption that this notification is constructed by the notification library, I'm not sure how we otherwise get around ths</p>



<a name="158129063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158129063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158129063">(Feb 12 2019 at 16:09)</a>:</h4>
<p>other than by special casing</p>



<a name="158129091"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158129091" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158129091">(Feb 12 2019 at 16:09)</a>:</h4>
<p>Ie, the notify library definitely returns canonical paths, but I am not sure if language client returns canonical paths...</p>



<a name="158129119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158129119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158129119">(Feb 12 2019 at 16:10)</a>:</h4>
<p>(i.e. instead of trying to normalize symlinks everywhere, we could just recognize that this behavior can arise for the tempdir results and just normalize their path components)</p>



<a name="158129176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158129176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jeremy Kolb <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158129176">(Feb 12 2019 at 16:10)</a>:</h4>
<p>Maybe but windows FAT32/NTFS is also case-insensitive and windows doesn't seem to share the same problem.</p>



<a name="158129203"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158129203" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158129203">(Feb 12 2019 at 16:10)</a>:</h4>
<p>yeah, I was wrong, it's not case sensitity after all</p>



<a name="158129386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158129386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158129386">(Feb 12 2019 at 16:12)</a>:</h4>
<p>The safest thing to do would be to change RootConfig to</p>
<div class="codehilite"><pre><span></span>RootConfig {
    root: PathBuf,
    // result of root.canonicalize() if it is different from root
    canonical_root: Option&lt;PathBuf&gt;
}
</pre></div>


<p>and check both roots in <code>contains</code></p>



<a name="158129461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158129461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158129461">(Feb 12 2019 at 16:13)</a>:</h4>
<p>Okay I'll look into that.</p>



<a name="158130159"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130159" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130159">(Feb 12 2019 at 16:22)</a>:</h4>
<p>I've looked at the LSP speck, and how paths should be handled is basically unspecified. The relevant issue is <a href="https://github.com/Microsoft/language-server-protocol/issues/669" target="_blank" title="https://github.com/Microsoft/language-server-protocol/issues/669">#669</a>.</p>



<a name="158130194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130194">(Feb 12 2019 at 16:22)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> given that we've only hit this in tests, perhaps we can use a less general solution? Let's call <code>.canonicalize()</code> in the test itself?</p>



<a name="158130216"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130216" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130216">(Feb 12 2019 at 16:23)</a>:</h4>
<p>urrr</p>



<a name="158130222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130222">(Feb 12 2019 at 16:23)</a>:</h4>
<p>I'm skeptical of that</p>



<a name="158130237"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130237" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130237">(Feb 12 2019 at 16:23)</a>:</h4>
<p>well, I suppose it depends</p>



<a name="158130247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130247">(Feb 12 2019 at 16:23)</a>:</h4>
<p>I think that the setup with two roots is probably right long term, but I don't feel too easy about makeing VFS code more complcated.</p>



<a name="158130250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130250">(Feb 12 2019 at 16:23)</a>:</h4>
<p>your thinking is that the use of tempdir is limited to tests alone?</p>



<a name="158130310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130310">(Feb 12 2019 at 16:24)</a>:</h4>
<p>I was thinking about that yeah, but now I understand that I am wrong ;-(</p>



<a name="158130326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130326">(Feb 12 2019 at 16:24)</a>:</h4>
<p>User totally can have a project in the symlinked directory</p>



<a name="158130335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130335">(Feb 12 2019 at 16:24)</a>:</h4>
<p>OMG i am late to pick up myso</p>



<a name="158130337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130337">(Feb 12 2019 at 16:24)</a>:</h4>
<p>my son</p>



<a name="158130338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130338">(Feb 12 2019 at 16:24)</a>:</h4>
<p>bye!</p>



<a name="158130345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158130345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158130345">(Feb 12 2019 at 16:24)</a>:</h4>
<p>bye!</p>



<a name="158477717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158477717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158477717">(Feb 13 2019 at 21:16)</a>:</h4>
<p>I don't understand. My recollection of my day today is that I did many runs and each time I would search the output log for the text <code>new.rs</code> and always came up empty</p>



<a name="158477753"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158477753" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158477753">(Feb 13 2019 at 21:17)</a>:</h4>
<p>and yet somehow I posted a gist that clearly had a rename of <code>new.rs</code> in the output</p>



<a name="158477792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158477792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158477792">(Feb 13 2019 at 21:17)</a>:</h4>
<p>oh wait, no, I added that line</p>



<a name="158477811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158477811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158477811">(Feb 13 2019 at 21:17)</a>:</h4>
<p>(instrumented my own <code>fn fs_rename</code> function that i added)</p>



<a name="158477872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158477872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158477872">(Feb 13 2019 at 21:18)</a>:</h4>
<p>I actually wonder if we should spend more time chasing this bug  <strong>at this time</strong>? There's an upstream issue about adding an easier and cross platform API:<a href="https://github.com/passcod/notify/issues/175" target="_blank" title="https://github.com/passcod/notify/issues/175">https://github.com/passcod/notify/issues/175</a></p>



<a name="158477940"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158477940" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158477940">(Feb 13 2019 at 21:19)</a>:</h4>
<p>If it is implemented (and <a href="https://github.com/vemoo/" target="_blank" title="https://github.com/vemoo/">https://github.com/vemoo/</a> is working on it) , than presumably this will become the problem of the library.</p>



<a name="158478010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478010">(Feb 13 2019 at 21:19)</a>:</h4>
<p>That is, I somewhat blame the API here, which looks like it exposes platform differences :)</p>



<a name="158478072"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478072" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478072">(Feb 13 2019 at 21:20)</a>:</h4>
<p>well even vemoo said they were surprised by the results here on this bug</p>



<a name="158478249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478249">(Feb 13 2019 at 21:22)</a>:</h4>
<p>but your point is that you think we might manage to actually build upon something that exhibits consistent behavior on all platforms? It would be nice.</p>



<a name="158478254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478254">(Feb 13 2019 at 21:22)</a>:</h4>
<p>Yeah, that's the problem: we are observing platform differences which arguably should be handled by the upstream library.</p>



<a name="158478320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478320">(Feb 13 2019 at 21:23)</a>:</h4>
<p>I can agree that it may not be a great idea to try to fix this problem 100% right now</p>



<a name="158478335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478335">(Feb 13 2019 at 21:23)</a>:</h4>
<p>and maybe better to just <code>#[cfg]</code>-out this (or all) vfs tests on OS X for now</p>



<a name="158478392"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478392" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478392">(Feb 13 2019 at 21:24)</a>:</h4>
<p>Like, the <code>vfs/io</code> module is waaay to complicated, and the best long-term strategy would be to move a bulk of it to a completely general purpose library. So I suggest watchicng how notify#175 develops for the time being. There's also a planned rewrite of the notify library...</p>



<a name="158478426"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478426" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478426">(Feb 13 2019 at 21:24)</a>:</h4>
<p>But it's good that we've fixed that <code>canonicalize</code> bug! That's defenitelly was a problem</p>



<a name="158478427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478427">(Feb 13 2019 at 21:24)</a>:</h4>
<p>still I want to at least get far enough here to see if there is a notify bug lurking here</p>



<a name="158478574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478574">(Feb 13 2019 at 21:26)</a>:</h4>
<p>Good! But don't feel bad about cfg-ing out this part of the test on MacOs if you get to far in the weeds!</p>



<a name="158478594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478594">(Feb 13 2019 at 21:26)</a>:</h4>
<p>also, could you rustfmthttps://github.com/rust-analyzer/rust-analyzer/pull/818?</p>



<a name="158478767"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158478767" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158478767">(Feb 13 2019 at 21:28)</a>:</h4>
<p>oh yeah let me take care of that</p>



<a name="158479132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479132">(Feb 13 2019 at 21:33)</a>:</h4>
<p>What do you think about trying to add explicit <code>.sync_data()</code> or <code>.sync_all()</code> calls to the VFS tests, though?</p>



<a name="158479148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479148">(Feb 13 2019 at 21:33)</a>:</h4>
<p>Do you think that shouldn't be necessary? It seems more robust to me than just adding delays (i.e. calls to <code>sleep()</code>)...</p>



<a name="158479210"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479210" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479210">(Feb 13 2019 at 21:34)</a>:</h4>
<p>(assuming one either puts them into the right places, or consistently uses a helper that always syncs, like the one I added in the gist I posted)</p>



<a name="158479273"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479273" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479273">(Feb 13 2019 at 21:35)</a>:</h4>
<p>I would think that neither delays nor syncs should ideally be necessary. </p>
<p>I think the test currently actually is written in a pretty good way, in that we always try to pump all of the events after each modification.</p>
<p>That is, the test should work because of causality, not because of the good timing.</p>



<a name="158479363"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479363" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479363">(Feb 13 2019 at 21:36)</a>:</h4>
<p>so an <code>fs::write(...)</code> invocation should cause the notify library to fire, regardless of whether the write has been pushed out to the disk?</p>



<a name="158479391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479391">(Feb 13 2019 at 21:37)</a>:</h4>
<p>or your point is that the <code>process_tasks</code> call should be waiting long enough for the event to come through?</p>



<a name="158479454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479454">(Feb 13 2019 at 21:38)</a>:</h4>
<p>More precisely, fs::write should trigger notify withing three seconds after the file descriptor is closed</p>



<a name="158479469"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479469" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479469">(Feb 13 2019 at 21:38)</a>:</h4>
<p>Like, it's not unreasonable to assume that file systems work this way, but I might be proven wrong here</p>



<a name="158479554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479554">(Feb 13 2019 at 21:40)</a>:</h4>
<blockquote>
<p>or your point is that the process_tasks call should be waiting long enough for the event to come through?</p>
</blockquote>
<p>basically, yes. The test guarantees that we can't loose events (modulo bugs), and I hope that eventually we see all of the events, where "eventually" is less than 3 seconds</p>



<a name="158479649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479649">(Feb 13 2019 at 21:40)</a>:</h4>
<p>I can understand in principle. I guess I just wish I wasn't seeing behavior vary depending on whether I include the sync calls or not. But I should be taking more precise notes on which of the changes I am making here actually matter, and in what way they matter.</p>



<a name="158479763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479763">(Feb 13 2019 at 21:42)</a>:</h4>
<p>Hmm this also seems potentially relevant: <a href="http://wingolog.org/archives/2018/05/21/correct-or-inotify-pick-one" target="_blank" title="http://wingolog.org/archives/2018/05/21/correct-or-inotify-pick-one">http://wingolog.org/archives/2018/05/21/correct-or-inotify-pick-one</a></p>



<a name="158479772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479772">(Feb 13 2019 at 21:42)</a>:</h4>
<p>yeah... I think you had some variability in exact raw events you have been observing? That should be OK I think: it is allowed to miss some of raw events as long as the last one is registered</p>



<a name="158479873"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158479873" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158479873">(Feb 13 2019 at 21:44)</a>:</h4>
<blockquote>
<p>Hmm this also seems potentially relevant: <a href="http://wingolog.org/archives/2018/05/21/correct-or-inotify-pick-one" target="_blank" title="http://wingolog.org/archives/2018/05/21/correct-or-inotify-pick-one">http://wingolog.org/archives/2018/05/21/correct-or-inotify-pick-one</a></p>
</blockquote>
<p>(or maybe there's nothing there you don't already know)</p>



<a name="158480028"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158480028" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158480028">(Feb 13 2019 at 21:46)</a>:</h4>
<p>interesting read! Together with that MacOS docs I think it implies that getting <strong>precise</strong> list of events is impossible, and useless, due to TOCTTOU.</p>
<p>We however don't need a precise list: we need to know if things "could have changed" to be correct (that whole comment about quiescent consistency on TastResult). I think <em>that</em> should be achieavable.</p>



<a name="158480080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158480080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158480080">(Feb 13 2019 at 21:47)</a>:</h4>
<p>well, better to say I hope :-)</p>



<a name="158480391"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158480391" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158480391">(Feb 13 2019 at 21:51)</a>:</h4>
<p>this question may be pointless, given your earlier statement (that we'd be better off switching to a different/better cross-platform API), but I figure I'll ask it anyway: The vfs test architecture, if I understand correctly, seems to be built on the assumption that you can predict the exact number of events you should always receive in response to the operations that are performed in between each call to <code>process_tasks</code>, is that right?</p>



<a name="158480454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158480454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158480454">(Feb 13 2019 at 21:52)</a>:</h4>
<p>this seems fundamentally at odds with the idea that sometimes events can be collapsed or missed</p>



<a name="158480521"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158480521" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158480521">(Feb 13 2019 at 21:53)</a>:</h4>
<p>I don't have any immediate suggestions for a <em>better</em> test architecture, other than maybe allowing for a <del>subset</del> subsequence of the events to be observed and still consider it a passing test, depending on which subsequence you observe, that is.</p>



<a name="158481147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158481147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158481147">(Feb 13 2019 at 22:00)</a>:</h4>
<blockquote>
<p>I think it implies that getting precise list of events is impossible, and useless, due to TOCTTOU</p>
</blockquote>
<p>on windows too, if the OS buffer overflows; you're supposed to re-read your directory and start over, but after a cursory glance I'm not sure that the <code>notify</code> crate handles that</p>



<a name="158481335"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158481335" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158481335">(Feb 13 2019 at 22:03)</a>:</h4>
<p>There's a RESCAN event for that I think. As long as we <em>know</em> that we should rescan, I think we are fine.</p>



<a name="158481553"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158481553" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158481553">(Feb 13 2019 at 22:06)</a>:</h4>
<blockquote>
<p>/// At the moment <code>RESCAN</code> events aren't emitted on Windows.</p>
</blockquote>



<a name="158481607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158481607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158481607">(Feb 13 2019 at 22:07)</a>:</h4>
<p>Explorer has a "Refresh" right-click menu option, maybe we should have one</p>



<a name="158524059"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524059" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524059">(Feb 14 2019 at 12:09)</a>:</h4>
<p>Okay I did some digging and I think that one way out of this in the short term could be to use the raw events rather than the debounced ones</p>



<a name="158524110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524110">(Feb 14 2019 at 12:10)</a>:</h4>
<p>I put up an issue at <a href="https://github.com/passcod/notify/issues/181" target="_blank" title="https://github.com/passcod/notify/issues/181">https://github.com/passcod/notify/issues/181</a></p>



<a name="158524181"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524181" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524181">(Feb 14 2019 at 12:11)</a>:</h4>
<p>the most bizarre thing is that in the common case, a rename of "foo" <strong>to</strong> "bar" on Mac OS X yields raw events that say that foo op was CREATE|RENAME|WRITE and bar op was REMOVE|RENAME. (Which strikes me as 100% backwards.) I don't know whether this is an OS X issue or some logic gone backwards in notify itself.</p>



<a name="158524530"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524530" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524530">(Feb 14 2019 at 12:17)</a>:</h4>
<p>Interesting!</p>
<p>Conceptually, I think like we should use debounced events</p>



<a name="158524604"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524604" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524604">(Feb 14 2019 at 12:18)</a>:</h4>
<p>at this point I'm also wondering if part of the issue here is that notify is, AFAICT, still using the FSEvent backend</p>



<a name="158524609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524609">(Feb 14 2019 at 12:18)</a>:</h4>
<p>despite saying that it would switch to kqueue?</p>



<a name="158524630"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524630" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524630">(Feb 14 2019 at 12:18)</a>:</h4>
<p>see here, namely: <a href="https://github.com/passcod/notify/pull/144#issuecomment-427560683" target="_blank" title="https://github.com/passcod/notify/pull/144#issuecomment-427560683">https://github.com/passcod/notify/pull/144#issuecomment-427560683</a></p>



<a name="158524640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524640">(Feb 14 2019 at 12:19)</a>:</h4>
<p>maybe they mean in v5 it will use kqueue</p>



<a name="158524661"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524661" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524661">(Feb 14 2019 at 12:19)</a>:</h4>
<p>Yeah, I think this is about v5</p>



<a name="158524669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524669">(Feb 14 2019 at 12:19)</a>:</h4>
<p>which now seems more remote than a year ago</p>



<a name="158524672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524672">(Feb 14 2019 at 12:20)</a>:</h4>
<p>in any case at this point I  am <em>super</em> curious if the problem is just someone swapped to/from somewhere in the notify/fsevent.rs code</p>



<a name="158524741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524741">(Feb 14 2019 at 12:20)</a>:</h4>
<p>yeah, I did a quick look at it, and it seems like a kind of code where it's easy to make subtle logic errors</p>



<a name="158524774"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524774" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524774">(Feb 14 2019 at 12:21)</a>:</h4>
<p>I'm going to do a quick check there, I'm already this deep into this</p>



<a name="158524997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158524997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158524997">(Feb 14 2019 at 12:24)</a>:</h4>
<p><span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span>  long term, we will need a reliable file watching service anyway, so it is a well-spent time</p>



<a name="158525333"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158525333" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158525333">(Feb 14 2019 at 12:30)</a>:</h4>
<p>hmm all of notify's <a href="http://fsevents.rs" target="_blank" title="http://fsevents.rs">fsevents.rs</a> test suite is cfg'ed-out under a <code>feature = "timing_tests"</code>. But several of them look like tests of basic functionality...</p>



<a name="158525353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158525353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158525353">(Feb 14 2019 at 12:31)</a>:</h4>
<p>(and of course they've all bitrotted)</p>



<a name="158525440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158525440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158525440">(Feb 14 2019 at 12:32)</a>:</h4>
<p>This comment in the <code>notify.rs</code> test suite may be relevant though:</p>
<div class="codehilite"><pre><span></span>    // macOS FsEvent needs some time to discard old events from its log.
    sleep_macos(10);
</pre></div>



<a name="158525477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158525477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158525477">(Feb 14 2019 at 12:33)</a>:</h4>
<p>(but that's only 10ms; I thought it might represent seconds but it doesnt.)</p>



<a name="158526125"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526125" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526125">(Feb 14 2019 at 12:44)</a>:</h4>
<blockquote>
<p>the most bizarre thing is that in the common case, a rename of "foo" <strong>to</strong> "bar" on Mac OS X yields raw events that say that foo op was CREATE|RENAME|WRITE and bar op was REMOVE|RENAME. (Which strikes me as 100% backwards.) I don't know whether this is an OS X issue or some logic gone backwards in notify itself.</p>
</blockquote>
<p>This is something that is prevalent and can happen on any OS. This is because the APIs report actual syscalls if not information from block level drivers. Then, applications may implement their moves however they want.</p>



<a name="158526155"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526155" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526155">(Feb 14 2019 at 12:45)</a>:</h4>
<p>i.e. "create -&gt; copy -&gt; delete old" is a very commonplace approach to implememnt file movement.</p>



<a name="158526238"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526238" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526238">(Feb 14 2019 at 12:46)</a>:</h4>
<p>in order to derive any sort of semantic information and to figure out what has happened, you must do some serious interpretation and guesswork.</p>



<a name="158526241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526241">(Feb 14 2019 at 12:46)</a>:</h4>
<p>okay, but wouldn't you expect "delete old" to map to a delete of foo, not bar?</p>



<a name="158526270"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526270" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526270">(Feb 14 2019 at 12:47)</a>:</h4>
<p>oh that... well, all I can suggest is that most likely this is an artifact of the filesystem implementation in macos.</p>



<a name="158526341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526341">(Feb 14 2019 at 12:48)</a>:</h4>
<p>there's definitely some magic happening in the layers here to reconstruct the operation from the events received from the FSEvents channel, I don't argue that point</p>



<a name="158526375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526375">(Feb 14 2019 at 12:49)</a>:</h4>
<p>and, as a reminder, we luckily don't actually care about the precise operation, we care only about the path that could have been affected.</p>



<a name="158526436"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526436" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526436">(Feb 14 2019 at 12:50)</a>:</h4>
<p>right. I would be entirely satisfied if I can coax <code>notify</code> into just telling us that <em>something happened</em> to any of {<code>foo</code>, <code>bar</code>}</p>



<a name="158526445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526445">(Feb 14 2019 at 12:50)</a>:</h4>
<p>(as in, get it to report both names back to us and then we look up what happened.)</p>



<a name="158526483"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526483" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526483">(Feb 14 2019 at 12:51)</a>:</h4>
<p>but in the majority of the cases I'm looking at, the oddities in the raw event sequences seems to cause the debouncing to drop any mention of <code>foo</code>.</p>



<a name="158526484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526484">(Feb 14 2019 at 12:51)</a>:</h4>
<blockquote>
<p>and, as a reminder, we luckily don't actually care about the precise operation, we care only about the path that could have been affected.</p>
</blockquote>
<p>Except it is entirely possible for the OS to not report any events for paths as well <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span></p>



<a name="158526493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526493">(Feb 14 2019 at 12:51)</a>:</h4>
<p>Yeah, that's what that "easy walkdir like API" issue is about</p>



<a name="158526543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526543">(Feb 14 2019 at 12:52)</a>:</h4>
<p><span class="user-mention" data-user-id="123586">@nagisa</span> hm, you mean I can write to a file and never be notified at all?</p>



<a name="158526546"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526546" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526546">(Feb 14 2019 at 12:52)</a>:</h4>
<p>Yes, that is very possible.</p>



<a name="158526566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526566">(Feb 14 2019 at 12:53)</a>:</h4>
<p>A common example of that would be anything related to storage not directly attached to the same motherboard to which the host CPU is attached to. Think: network storage.</p>



<a name="158526639"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526639" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526639">(Feb 14 2019 at 12:54)</a>:</h4>
<p>...okay, but surely extreme cases like that should not lead us to lower our expectations for (reliable) behavior in the very common case of the local file system?</p>



<a name="158526641"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526641" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526641">(Feb 14 2019 at 12:54)</a>:</h4>
<p>Sure, yeah</p>



<a name="158526666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526666">(Feb 14 2019 at 12:55)</a>:</h4>
<p>In general, we already ignore errors from the watcher. That is, if a watcher fails to start for path for "reasons", we just ignore it and proceede without  waching</p>



<a name="158526683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526683">(Feb 14 2019 at 12:55)</a>:</h4>
<p>That works well because, for most of the changes, it's the editor who notifies us</p>



<a name="158526761"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526761" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526761">(Feb 14 2019 at 12:56)</a>:</h4>
<p>Like, <code>vfs</code> watcher is a relatively new addition, we haven't watched a file system <strong>at all</strong> for a long time, and that actually worked pretty good. As is, you'd have to restart rust-analyzer when you switch git branches to force a rescan, but normal changes via VS Code worked ok</p>



<a name="158526794"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526794" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526794">(Feb 14 2019 at 12:57)</a>:</h4>
<p>I would prefer something that works every time. The practice shows that some people do use rust with at least networked storage, and network storage is definitely not the only example of this problem.</p>
<p>Whatever is done here, please just keep in mind that this is possible and provide <em>options</em> to your end users.</p>



<a name="158526808"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526808" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nagisa <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526808">(Feb 14 2019 at 12:57)</a>:</h4>
<p>(not that rustc works with networked storage right now, IIRC there are some ICEs here and there)</p>



<a name="158526886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526886">(Feb 14 2019 at 12:58)</a>:</h4>
<p>I certainly wouldn't object to full refresh (or "rescan", whatever terminology is), either periodic and/or via-ui-command</p>



<a name="158526918"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158526918" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158526918">(Feb 14 2019 at 12:59)</a>:</h4>
<p>Yeah, UI command for "refresh"  is generally required.</p>



<a name="158527215"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158527215" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158527215">(Feb 14 2019 at 13:03)</a>:</h4>
<p>very odd. Some of the notify debouncing tests wait only 10ms after setting up the initial state. Others wait 35,000ms. (Specifically for Mac OS X, that is)</p>



<a name="158528376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158528376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158528376">(Feb 14 2019 at 13:21)</a>:</h4>
<p>(well, maybe not so odd, if people just add the delays in an ad hoc manner to make the tests pass. I just would have expected uniform treatment.)</p>



<a name="158560412"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158560412" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158560412">(Feb 14 2019 at 20:09)</a>:</h4>
<p>So, the fundamental problem with vfs is that we don't test it on mac and windows on the CI...</p>
<p>At the same time, I don't want to add Windows and Mac to CI in general, to keep CI fast....</p>
<p>What about moving <code>ra_vfs</code> to a separate repo with a more extensive CI setup? There's nothing specific to Rust language in the vfs, so presumably we could just publish it to <a href="http://crates.io" target="_blank" title="http://crates.io">crates.io</a>? It has a few local deps, but I think we can get rid of them.</p>



<a name="158561559"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158561559" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158561559">(Feb 14 2019 at 20:24)</a>:</h4>
<p>This sounds promising</p>



<a name="158608227"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158608227" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158608227">(Feb 15 2019 at 11:41)</a>:</h4>
<p>I'll try moving <code>ra_vfs</code> outside then (not today, but soonish). Might be a good opportunity to check azure pipelines as a universal CI for all platforms as well.</p>
<p>One thing I am not sure about is if "memory overlay" bit should be in the separate repo or in the main repo. Currently it is a part of VFS, but I can image a factoring where VFS deals only with files on disk, and in-memory stuff is composed on top.  I am inclined to move vfs as is.</p>



<a name="158609157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158609157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158609157">(Feb 15 2019 at 12:01)</a>:</h4>
<p>Okay cool</p>



<a name="158609198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158609198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158609198">(Feb 15 2019 at 12:02)</a>:</h4>
<p>I'm just happy to put a pin in this task. It was educational but also a bit frustrating at times.</p>



<a name="158609299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer%23734%20test_vfs_works%20on%20OS%20X/near/158609299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/rust-analyzer.23734.20test_vfs_works.20on.20OS.20X.html#158609299">(Feb 15 2019 at 12:04)</a>:</h4>
<p>Regarding PR <a href="https://github.com/rust-lang/rust/issues/837" target="_blank" title="https://github.com/rust-lang/rust/issues/837">#837</a>, I briefly considering trying to also put in all the 35 second delays that seemed to help, guarded under something like <code>#[cfg(feature="slow_and_steady_because_fsevents")]</code>. But I think in practice no one would ever use it.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>